const {src, dest, watch} = require("gulp");
const sass = require("gulp-sass");

function sassFn(){
    return src("./src/sass/*.scss")
    .pipe(sass().on("error", sass.logError))
    .pipe(dest("./www/css"))
}

function watchSassFn(cb){
    watch(["./src/sass/*.scss"], sassFn)
    cb()
}

exports.sass = watchSassFn;
